<?php

class Xslt
{
    private $_stylesheet;
    private $_proc;
    private $_params;
    
    public function __construct($stylesheet)
    {

	$this->_stylesheet = new DomDocument();
	$this->_stylesheet->load($stylesheet);
	
	$this->_proc = new XsltProcessor();
	$this->_proc->importStylesheet($this->_stylesheet);
    }
    
    public function transform($input_dom)
    {
	$result = $this->_proc->transformToXML($input_dom);
	return $result;
    }
    
    public function setParam($key, $value)
    {
    	$this->_proc->setParameter(null, $key, $value);
    }
        
    public function getParam($key)
    {
	return $this->_proc->getParameter($key);
    }
}

?>